// src/setupProxy.js
const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function(app) {
    app.use(
        '/ai',
        createProxyMiddleware({
            target: 'http://localhost:19999',
            changeOrigin: true,
            secure: false,
            logLevel: 'debug', // 添加日志便于调试
        })
    );
};